using UniversalAdmin.Application.DTOs;

namespace UniversalAdmin.Application.Services;

public interface IRolePermissionService
{
    // 为角色分配权限
    Task AssignPermissionsToRoleAsync(Guid roleId, List<Guid> permissionIds);
    
    // 清空角色权限
    Task ClearRolePermissionsAsync(Guid roleId);
    
    // 获取角色的权限列表
    Task<IEnumerable<PermissionDto>> GetRolePermissionsAsync(Guid roleId);
    
    // 检查角色是否有指定权限
    Task<bool> HasPermissionAsync(Guid roleId, string resource, string action);
    
    // 获取用户的所有权限
    Task<IEnumerable<PermissionDto>> GetUserPermissionsAsync(Guid userId);
    
    // 检查用户是否有指定权限
    Task<bool> UserHasPermissionAsync(Guid userId, string resource, string action);
}
